package com.p2p.system.controller;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.p2p.model.entity.Bidrequest;
import com.p2p.model.entity.Bidrequestaudithistory;
import com.p2p.system.common.Result;
import com.p2p.system.service.BidrequestaudithistoryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 借款审核历史表 前端控制器
 * </p>
 *
 * @author 黄旭彬
 * @since 2023-12-13
 */
@CrossOrigin
@RestController
@Api(tags = "审核历史接口")
@RequestMapping("/system/bidrequestHistory")
public class BidrequestaudithistoryController {

    @Autowired
    private BidrequestaudithistoryService bidrequestaudithistoryService;

    @ApiOperation("根据用户ID找审核历史")
    @PostMapping("/findhistoryListById/{id}")
    public Result findhistoryListById(@PathVariable Long id){
        Page<Bidrequest> pageParam = new Page<>(1,10);
        IPage<Bidrequestaudithistory> bidrequestaudithistory = this.bidrequestaudithistoryService.selectHisById(pageParam,id);

        return Result.ok(bidrequestaudithistory);
    }


}

